package com.learn.run;

import com.learn.config.EventConfig;
import com.learn.event.DemoPublisher;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 11:18 2018-11-13
 * @Modify by:
 */
public class RunEvent {

  public static void main(String[] args) {
    AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(EventConfig.class);
    DemoPublisher publisher = context.getBean(DemoPublisher.class);
    publisher.publish("发布一体消息");
  }

}
